package rmi

import java.rmi.Naming

class MyRemoteCli {
  def go() = {
    val service = Naming.lookup("rmi://127.0.0.1:9999/RemoteHello").asInstanceOf[MyRemote]
    var str = service.sayHello()
    println("str from remote is= " + str)
  }

}

object MyRemoteCli {
  def main(args: Array[String]): Unit = {
    new MyRemoteCli().go()
  }
}